$(document).ready(function () {
    $(".check_a").click(function () {
        var appid = $(".check_a").attr("appinfoid");
        var status_selectorid = "#appInfoStatus" + appid;
        console.log(status_selectorid)
        var status = $(status_selectorid).text();
        console.log(status)
        $.ajax({
            url: "/admin/appcheck",
            method: 'POST',
            data: {
                "appid": appid,
                "curStatus": status
            },
            success: function (data) {
                if (data.success === true) {
                    if (confirm("审核通过成功！")) {
                        window.location.href = "/admin/applist";
                    } else {
                        window.location.href = "/admin/applist";
                    }
                }
            }
        })
    });
    $(".check_b").click(function () {
        var appid = $(".check_b").attr("appinfoid");
        var status_selectorid = "#appInfoStatus" + appid;
        console.log(status_selectorid)
        var status = $(status_selectorid).text();
        console.log(status)
        $.ajax({
            url: "/admin/appcheck_N",
            method: 'POST',
            data: {
                "appid": appid,
                "curStatus": status
            },
            success: function (data) {
                if (data.success === true) {
                    if (confirm("审核未通过成功！")) {
                        window.location.href = "/admin/applist";
                    } else {
                        window.location.href = "/admin/applist";
                    }
                }
            }
        })
    });
});